package com.elite.groovy.kh;

import java.io.Serializable;

/**
 * @projectName: ngsapitask-davco
 * @package: com.elite.groovy.kh
 * @className: ChatResult
 * @author: LiJT
 * @description: TODO
 * @date: 2023-07-10 15:24
 * @version: 1.0
 */
public class ChatResult implements Serializable {
    public static final String ERROR = "-1";
    public static final String WARN = "0";
    public static final String SUCCESS = "1";
    private String state;
    private String msg;
    private String clientGuid;
    private String brand;
    private String ticket;
    private boolean success;
    private int queue;
    private Object result;

    public ChatResult() {
        this.state = "-1";
        this.success = false;
    }

    public ChatResult(String state, boolean success) {
        this.state = state;
    }

    public ChatResult(String state, boolean success, String message) {
        this.state = state;
        this.msg = message;
    }

    public ChatResult(String state, boolean success, String msg, Object result) {
        this.state = state;
        this.success = success;
        this.msg = msg;
        this.result = result;
    }

    public ChatResult(String state, boolean success, String msg, int queue, Object result) {
        this.state = state;
        this.success = success;
        this.msg = msg;
        this.queue = queue;
        this.result = result;
    }

    public ChatResult(String state, boolean success, String msg, int queue, String clientGuid, Object result) {
        this.state = state;
        this.success = success;
        this.msg = msg;
        this.queue = queue;
        this.clientGuid = clientGuid;
        this.result = result;
    }

    public ChatResult(String state, boolean success, String msg, int queue, String clientGuid, String brand, Object result) {
        this.state = state;
        this.success = success;
        this.msg = msg;
        this.queue = queue;
        this.clientGuid = clientGuid;
        this.brand = brand;
        this.result = result;
    }

    public String getState() {
        return this.state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getMsg() {
        return this.msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public boolean getSuccess() {
        return this.success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public int getQueue() {
        return this.queue;
    }

    public void setQueue(int queue) {
        this.queue = queue;
    }

    public Object getResult() {
        return this.result;
    }

    public void setResult(Object result) {
        this.result = result;
    }

    public String toString() {
        StringBuffer sb = new StringBuffer();
        sb.append("[STATE:").append(this.state).append("]");
        if (this.msg != null) {
            sb.append("[MSG:").append(this.msg).append("]");
        }
        sb.append("[SUCCESS:").append(this.success).append("]");

        if (this.clientGuid != null) {
            sb.append("[clientGuid:").append(this.clientGuid).append("]");
        }

        if (this.brand != null) {
            sb.append("[brand:").append(this.brand).append("]");
        }

        sb.append("[QUEUE:").append(this.queue).append("]");

        if (this.result != null) {
            sb.append("[RESULT:").append(this.result.toString()).append("]");
        }

        return sb.toString();
    }

    public String getTicket() {
        return ticket;
    }

    public void setTicket(String ticket) {
        this.ticket = ticket;
    }

    public String getClientGuid() {
        return clientGuid;
    }

    public void setClientGuid(String clientGuid) {
        this.clientGuid = clientGuid;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }
}
